<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑题目</title>
	<script type="text/javascript" src="__JS__/menu.js"></script>
	<script type="text/javascript" src="__JS__/leftmenubar.js"></script>
	<link rel="stylesheet" type="text/css" href="__CSS__/header.css" />
	<script type="text/javascript" src="__JS__/jshelper.js"></script> 
	<link rel="stylesheet" type="text/css" href="__CSS__/footer.css" />
	<script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
    <script type="text/javascript" src="__JS__/jQuery/jquery.form.js"></script>
<script   type= "text/javascript"> 
	function   subform(gourl){   
 	 var   gourl; 
  	form2.action=gourl; 
  	form2.submit(); 
	} 
</script> 
	<script type="text/JavaScript">
       $(function(){
           $('#form1').ajaxForm({
               //beforeSubmit:  function(){alert("before");},  // pre-submit callback
               success:       complete,  // post-submit callback
               error:function(){alert("error");},
               dataType: 'json'
           });
           
           function complete(data){
               if (data.status==1)
               {
               	window.location='__URL__/choicedetail';
               }else{
                   $('#result').html(data.info).show();
               }
           }
       });
       </script>
</head>

<body bgcolor="#EEEEEE">
	<!-- layout::Auth:header::0 -->
	<div class="nowposition">
	当前位置：
		<a href='__APP__/index/index' class="nowpositionhref">主页</a>>
		<a href='__URL__/index' class="nowpositionhref">后台管理</a>>
		<a href='__URL__/choose1' class="nowpositionhref">测试管理</a>>
		<a href='__URL__/choose2' class="nowpositionhref">题库</a>>
		<a href='__URL__/choiceadd' class="nowpositionhref">单选编辑</a>>
		<a href='__URL__/choicedetail' class="nowpositionhref">单选题库</a>>
		单选修改			
	</div>
	<div id="container">
		<!-- layout::Auth:leftmenu::0 -->
	</div>
	<div class="college_edit">
		<form id='form1' method="post" action="__URL__/choiceupdate" >	
		<div id='result' style="color:red; font-size:12px;"></div>
		<input type="hidden" name="id" value=<?php echo ($vo["id"]); ?>>
			<table border="0" align="center">
				<tr>
					<td width="400" >题目 :<?php echo ($vo["name"]); ?></td>
					<td width="400" >当前所属课程:<?php echo ($cname); ?></td>
				</tr>
				<tr>
					<td width="400" >修改题目：<input type="text" name="name" value=<?php echo ($vo["name"]); ?>></td>				
					<td width="400" >修改所属课程：
            		<select name="courseid">
              			<?php if(is_array($cnlist)): $i = 0; $__LIST__ = $cnlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo1): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo1["id"]); ?>><?php echo ($vo1["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
           		 	</select>
           		 	</td>
				</tr>
				<tr><td>
					标准答案 :<?php echo ($vo["answer"]); ?><br>
					标准答案:<select name="answer">
			              		<?php if(is_array($anlist)): $i = 0; $__LIST__ = $anlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo1): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo1); ?>><?php echo ($vo1); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
           		 			</select></td>
					<td>
					选项：<br>
					<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?>A:<input type='text' name='A' value='<?php echo ($vo["A"]); ?>'><br>
						B:<input type='text' name='B' value='<?php echo ($vo["B"]); ?>'><br>
						C:<input type='text' name='C' value='<?php echo ($vo["C"]); ?>'><br>
						D:<input type='text' name='D' value='<?php echo ($vo["D"]); ?>'><br><?php endforeach; endif; else: echo "" ;endif; ?></td>
				</tr>
				<tr>
					<td><input type="submit" value="更新"></td>
				</tr>
			</table>
		</form>
		
		
	</div>

</body>
</html>